﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using DevExpress.XtraBars.Ribbon;


namespace QLTV
{
    public partial class F_Main : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public F_Main()
        {
            InitializeComponent();
        }

        private void B_Login_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_login frm = new HeThongGiaoDien.F_login();
            frm.ShowDialog();           

        }

        private void B_Exit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.Close();
        }

        private void B_QLNV_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!HeThongXuLy.KiemtraForm.IsFocusForm(typeof(HeThongGiaoDien.F_NhanVien), this))
            {
                HeThongGiaoDien.F_NhanVien frm = new HeThongGiaoDien.F_NhanVien();
                 frm.MdiParent=this;
                 frm.Show();
            }
            
        }

        private void B_ThamSo_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!HeThongXuLy.KiemtraForm.IsFocusForm(typeof(HeThongGiaoDien.F_ThamSo), this))
            {
                HeThongGiaoDien.F_ThamSo frm = new HeThongGiaoDien.F_ThamSo();
                frm.ShowDialog();
            }
        }

        private void btnMoney_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
        }

        private void btndefaul_ItemClick(object sender, ItemClickEventArgs e)
        {

            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Blue");
        }

        private void btncaramel_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
                      
        }

        private void btnLilian_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
        }

        private void btnWorld_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
        }

        private void btniMaginary_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
        }

        private void btnBlack_ItemClick(object sender, ItemClickEventArgs e)
        {
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(e.Item.Caption);
        }

        private void F_Main_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dr = MessageBox.Show(" Bạn muốn thoát hay không ? ", "Thoát chương trình ", MessageBoxButtons.YesNo,MessageBoxIcon.Question);
                if (dr==DialogResult.No)
                {
                    e.Cancel=true;
                }
        }

        private void B_BanQuyen_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_BanQuyen frm = new HeThongGiaoDien.F_BanQuyen();
            frm.ShowDialog();
        }

        private void B_BangCap_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_BangCap frm = new HeThongGiaoDien.F_BangCap();
            frm.ShowDialog();
        }

        private void B_PhongBan_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_BoPhan frm = new HeThongGiaoDien.F_BoPhan();
            frm.ShowDialog();
        }

        private void B_ChucVu_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_ChucVu frm = new HeThongGiaoDien.F_ChucVu();
            frm.ShowDialog();
        }

        private void B_Lapthe_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!HeThongXuLy.KiemtraForm.IsFocusForm(typeof(HeThongGiaoDien.F_DocGia), this))
            {
                HeThongGiaoDien.F_DocGia frm = new HeThongGiaoDien.F_DocGia();
                frm.MdiParent = this;
                frm.Show();
            }
            
        }

        private void B_NhapSach_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!HeThongXuLy.KiemtraForm.IsFocusForm(typeof(HeThongGiaoDien.F_Sach), this))
            {

                HeThongGiaoDien.F_Sach frm = new HeThongGiaoDien.F_Sach();
                frm.MdiParent = this;
                frm.Show();
            }
        }

        private void B_TheLoai_ItemClick(object sender, ItemClickEventArgs e)
        {
           
            HeThongGiaoDien.F_TheLoaiSach frm = new HeThongGiaoDien.F_TheLoaiSach();
            frm.ShowDialog();
        }

        private void B_ChoMuon_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!HeThongXuLy.KiemtraForm.IsFocusForm(typeof(HeThongGiaoDien.F_PhieuMuonSach), this))
            {

                HeThongGiaoDien.F_PhieuMuonSach frm = new HeThongGiaoDien.F_PhieuMuonSach();
                frm.MdiParent = this;
                frm.Show();
            }
        }

        private void B_ThanhLy_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_ThanhLySach frm = new HeThongGiaoDien.F_ThanhLySach();
            frm.ShowDialog();
        }

        private void B_MatSach_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_GhiNhanMatSach frm = new HeThongGiaoDien.F_GhiNhanMatSach();
            frm.ShowDialog();
        }

        private void B_Phat_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_PhieuThuTienPhat frm = new HeThongGiaoDien.F_PhieuThuTienPhat();
            frm.ShowDialog();
        }

        private void B_TraSach_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_PhieuTraSach frm = new HeThongGiaoDien.F_PhieuTraSach();
            frm.MdiParent = this;
            frm.Show();
        }

        private void F_Main_Load(object sender, EventArgs e)
        {

        }

        private void B_LoaiDG_ItemClick(object sender, ItemClickEventArgs e)
        {
            HeThongGiaoDien.F_LoaiDocGia frm = new HeThongGiaoDien.F_LoaiDocGia();
            frm.ShowDialog();
        }

                             
               
    }
}
